namespace Microsoft.ReportingServices.OnDemandProcessing.Scalability
{
	internal static class PrimeHelper
	{
		private static int[] m_primes = new int[208]
		{
			73943,
			73951,
			73961,
			73973,
			73999,
			74017,
			74021,
			74027,
			74047,
			74051,
			74071,
			74077,
			74093,
			74099,
			74101,
			74131,
			74143,
			74149,
			74159,
			74161,
			74167,
			74177,
			74189,
			74197,
			74201,
			74203,
			74209,
			74219,
			74231,
			74257,
			74279,
			74287,
			74293,
			74297,
			74311,
			74317,
			74323,
			74353,
			74357,
			74363,
			74377,
			74381,
			74383,
			74411,
			74413,
			74419,
			74441,
			74449,
			74453,
			74471,
			74489,
			74507,
			74509,
			74521,
			74527,
			74531,
			74551,
			74561,
			74567,
			74573,
			74587,
			74597,
			74609,
			74611,
			74623,
			74653,
			74687,
			74699,
			74707,
			74713,
			74717,
			74719,
			74729,
			74731,
			74747,
			74759,
			74761,
			74771,
			74779,
			74797,
			74821,
			74827,
			74831,
			74843,
			74857,
			74861,
			74869,
			74873,
			74887,
			74891,
			74897,
			74903,
			74923,
			74929,
			74933,
			74941,
			74959,
			75011,
			75013,
			75017,
			75029,
			75037,
			75041,
			75079,
			75083,
			75109,
			75133,
			75149,
			75161,
			75167,
			75169,
			75181,
			75193,
			75209,
			75211,
			75217,
			75223,
			75227,
			75239,
			75253,
			75269,
			75277,
			75289,
			75307,
			75323,
			75329,
			75337,
			75347,
			75353,
			75367,
			75377,
			75389,
			75391,
			75401,
			75403,
			75407,
			75431,
			75437,
			75479,
			75503,
			75511,
			75521,
			75527,
			75533,
			75539,
			75541,
			75553,
			75557,
			75571,
			75577,
			75583,
			75611,
			75617,
			75619,
			75629,
			75641,
			75653,
			75659,
			75679,
			75683,
			75689,
			75703,
			75707,
			75709,
			75721,
			75731,
			75743,
			75767,
			75773,
			75781,
			75787,
			75793,
			75797,
			75821,
			75833,
			75853,
			75869,
			75883,
			75913,
			75931,
			75937,
			75941,
			75967,
			75979,
			75983,
			75989,
			75991,
			75997,
			76001,
			76003,
			76031,
			76039,
			76079,
			76081,
			76091,
			76099,
			76103,
			76123,
			76129,
			76147,
			76157,
			76159,
			76163,
			76207,
			76213,
			76231,
			76243,
			76249
		};

		private static int[,] m_hashInputs = new int[208, 2]
		{
			{
				17673,
				21817
			},
			{
				69305,
				11044
			},
			{
				52070,
				62319
			},
			{
				43808,
				55546
			},
			{
				33848,
				20475
			},
			{
				16294,
				31799
			},
			{
				63480,
				39377
			},
			{
				55213,
				54700
			},
			{
				69039,
				33671
			},
			{
				1653,
				6340
			},
			{
				72191,
				52883
			},
			{
				66397,
				49888
			},
			{
				18228,
				34696
			},
			{
				68515,
				48810
			},
			{
				34585,
				31519
			},
			{
				67727,
				24353
			},
			{
				44656,
				26697
			},
			{
				35237,
				56297
			},
			{
				71531,
				6638
			},
			{
				26749,
				69880
			},
			{
				1743,
				32897
			},
			{
				33137,
				5595
			},
			{
				6884,
				11668
			},
			{
				53040,
				65613
			},
			{
				49280,
				27759
			},
			{
				32170,
				9871
			},
			{
				3199,
				33878
			},
			{
				33927,
				38967
			},
			{
				29596,
				19575
			},
			{
				67078,
				17505
			},
			{
				68184,
				69337
			},
			{
				21111,
				2381
			},
			{
				26974,
				66239
			},
			{
				61466,
				36964
			},
			{
				4219,
				73314
			},
			{
				57547,
				62639
			},
			{
				6990,
				5948
			},
			{
				4620,
				39487
			},
			{
				19871,
				61039
			},
			{
				43181,
				6598
			},
			{
				56036,
				2999
			},
			{
				73977,
				6888
			},
			{
				73773,
				58061
			},
			{
				21238,
				10847
			},
			{
				67191,
				70705
			},
			{
				26831,
				52157
			},
			{
				13860,
				9301
			},
			{
				1812,
				6700
			},
			{
				11867,
				30873
			},
			{
				53049,
				14982
			},
			{
				24578,
				16189
			},
			{
				61658,
				50480
			},
			{
				44687,
				44009
			},
			{
				2906,
				71768
			},
			{
				29394,
				69014
			},
			{
				19214,
				43063
			},
			{
				50919,
				60728
			},
			{
				35962,
				65435
			},
			{
				70010,
				14284
			},
			{
				3001,
				43436
			},
			{
				45213,
				50833
			},
			{
				44352,
				7950
			},
			{
				46709,
				5482
			},
			{
				48996,
				72304
			},
			{
				4157,
				72541
			},
			{
				27748,
				63645
			},
			{
				8108,
				28343
			},
			{
				56678,
				40043
			},
			{
				15896,
				23685
			},
			{
				36822,
				29970
			},
			{
				55409,
				24084
			},
			{
				56141,
				72993
			},
			{
				51740,
				58493
			},
			{
				1334,
				27768
			},
			{
				48034,
				10965
			},
			{
				11297,
				72351
			},
			{
				27993,
				9709
			},
			{
				44487,
				48482
			},
			{
				46570,
				53913
			},
			{
				3851,
				39363
			},
			{
				69880,
				5229
			},
			{
				67895,
				31598
			},
			{
				41481,
				30324
			},
			{
				35119,
				22715
			},
			{
				4180,
				70832
			},
			{
				49771,
				46551
			},
			{
				52311,
				47847
			},
			{
				62959,
				21252
			},
			{
				69657,
				46253
			},
			{
				31019,
				63155
			},
			{
				4167,
				21353
			},
			{
				24454,
				68085
			},
			{
				61512,
				30259
			},
			{
				35825,
				73330
			},
			{
				58785,
				8268
			},
			{
				68442,
				36854
			},
			{
				19907,
				72452
			},
			{
				35042,
				50383
			},
			{
				31127,
				24685
			},
			{
				31700,
				21539
			},
			{
				23522,
				53595
			},
			{
				23692,
				52253
			},
			{
				36159,
				39714
			},
			{
				20204,
				55207
			},
			{
				21698,
				23361
			},
			{
				53945,
				385
			},
			{
				23049,
				15639
			},
			{
				35368,
				48760
			},
			{
				55876,
				75038
			},
			{
				45195,
				11309
			},
			{
				69689,
				36873
			},
			{
				39018,
				71081
			},
			{
				2478,
				13012
			},
			{
				26795,
				55062
			},
			{
				12931,
				12724
			},
			{
				65354,
				45211
			},
			{
				14674,
				9557
			},
			{
				39855,
				25674
			},
			{
				72933,
				47406
			},
			{
				32142,
				21956
			},
			{
				10145,
				55907
			},
			{
				51918,
				35634
			},
			{
				29522,
				68373
			},
			{
				13933,
				4323
			},
			{
				37355,
				61636
			},
			{
				69924,
				31379
			},
			{
				54830,
				20500
			},
			{
				27126,
				62006
			},
			{
				14720,
				27899
			},
			{
				50000,
				23273
			},
			{
				13038,
				40474
			},
			{
				42475,
				9030
			},
			{
				33342,
				8831
			},
			{
				61079,
				13550
			},
			{
				51149,
				9752
			},
			{
				51237,
				8546
			},
			{
				43090,
				23345
			},
			{
				1183,
				13905
			},
			{
				60447,
				3443
			},
			{
				41780,
				9422
			},
			{
				74607,
				22567
			},
			{
				17838,
				26705
			},
			{
				18196,
				34161
			},
			{
				65960,
				69712
			},
			{
				57941,
				53393
			},
			{
				11026,
				45256
			},
			{
				73033,
				8939
			},
			{
				8976,
				45168
			},
			{
				13555,
				43067
			},
			{
				2353,
				20780
			},
			{
				7414,
				400
			},
			{
				28661,
				27718
			},
			{
				10497,
				61621
			},
			{
				63921,
				31631
			},
			{
				19394,
				13285
			},
			{
				1672,
				11325
			},
			{
				61799,
				40748
			},
			{
				24268,
				66133
			},
			{
				22762,
				15877
			},
			{
				66514,
				74920
			},
			{
				18458,
				67143
			},
			{
				31240,
				73545
			},
			{
				74448,
				6085
			},
			{
				11105,
				34290
			},
			{
				14441,
				31640
			},
			{
				377,
				17489
			},
			{
				1098,
				21086
			},
			{
				2024,
				74459
			},
			{
				69695,
				65891
			},
			{
				16278,
				32281
			},
			{
				46002,
				34480
			},
			{
				50516,
				44821
			},
			{
				51901,
				75510
			},
			{
				59307,
				32453
			},
			{
				60481,
				18555
			},
			{
				22531,
				73543
			},
			{
				52428,
				3124
			},
			{
				2360,
				16009
			},
			{
				44987,
				30937
			},
			{
				29097,
				4437
			},
			{
				50745,
				29796
			},
			{
				17284,
				63681
			},
			{
				12968,
				60100
			},
			{
				10275,
				40913
			},
			{
				38897,
				25682
			},
			{
				72515,
				32764
			},
			{
				75610,
				34413
			},
			{
				29103,
				59952
			},
			{
				16765,
				62418
			},
			{
				21795,
				75026
			},
			{
				22669,
				54638
			},
			{
				49832,
				71933
			},
			{
				9192,
				2693
			},
			{
				41076,
				74049
			},
			{
				18817,
				62067
			},
			{
				29688,
				38981
			},
			{
				37015,
				11898
			},
			{
				57680,
				16336
			},
			{
				17310,
				63029
			},
			{
				32033,
				68043
			},
			{
				65569,
				18561
			},
			{
				69768,
				34999
			},
			{
				22117,
				65946
			},
			{
				74267,
				18149
			},
			{
				50165,
				18459
			},
			{
				75497,
				58797
			},
			{
				9209,
				30195
			},
			{
				57970,
				72406
			}
		};

		internal static int GetPrime(int level)
		{
			return m_primes[level];
		}

		internal static int GetHashInputA(int level)
		{
			return m_hashInputs[level, 0];
		}

		internal static int GetHashInputB(int level)
		{
			return m_hashInputs[level, 1];
		}
	}
}
